//
// Created by 11510 on 2024/6/23.
//

#ifndef TEXTQUERY_WORDQUERY_H
#define TEXTQUERY_WORDQUERY_H

#include "QueryBase.h"
#include <iostream>


class WordQuery : public QueryBase {
    friend class Query;

    WordQuery(const string &s) : query_word(s) {}

    QueryResult eval(const TextQuery &t) const {
        return t.query(query_word);
    }

    string rep() const {
        return query_word;
    }

    /* 要查找的单词 */
    string query_word;
};


#endif //TEXTQUERY_WORDQUERY_H
